﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VideoClipNameHelper;

namespace SerializeData
{
    class Program
    {
        static List<string> errList = new List<string>();
        static List<VideoFile> sourceVideoFiles;
        static int nErrors = 0;

        static void Main(string[] args)
        {
            Console.WriteLine("ConfigData");
            ConfigPaths cp = new ConfigPaths();
            ConfigData.ReadConfig(cp);
            
            Console.WriteLine("LoadClipsFromDisk");
            nErrors = VideoClipNameHelper.VideoFile.LoadClipsFromDisk(cp.SourceDirs, ref sourceVideoFiles, errList);
            Console.WriteLine("Serialize");
            Serialization.Serialize(sourceVideoFiles);
            Console.WriteLine("--");
            //
            //
            if(0 != errList.Count)
            {
                Console.WriteLine("errList");
                foreach (string s in errList)
                {
                    Console.WriteLine(s);
                }
                Console.WriteLine("--errList");
            }
            else
            {
                Console.WriteLine("No Errors");
            }
            //
        }
    }//class
}//namespace
